{layout name="p/base_1"}
<div id="wrapper">
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>资讯和常见问题管理 <small>文章列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 文章列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以添加、修改、删除文章
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <!-- 选项卡start -->
      <div class="bs-example">
        <!-- 选项卡标题start -->
        <ul class="nav nav-tabs" style="margin-bottom:15px;">
          <li class="active">
            <a href="#one" data-toggle="tab">资讯文章</a>
          </li>
          <li>
            <a href="#two" data-toggle="tab">常见问题</a>
          </li>
        </ul>
        <!-- 选项卡标题end -->
        <!-- 选项卡内容start -->
        <div id="myTabContent" class="tab-content">
          <!-- 选项卡内容1资讯文章start -->
          <div id="one" class="tab-pane fade active in">
            <!-- 基本信息start -->
            <form action="/messagearticle/delete" method="post" id='delete'>
            	<input type="hidden" id='method' name="_method" value="DELETE">
	            <div class="col-lg-12">
	              <div class="form-group input-group" style="width:50%;float:right;">
	                <input class="form-control" type="text">
	                <span class="input-group-btn">
	                  <button class="btn btn-default"><i class="fa fa-search"></i></button>
	                </span>
	              </div>
	              <div class="btn-group">
	                <a href="/messagearticle/create"class="btn btn-primary">添加文章</a>
	              </div>
	              <div class="btn-group">
	                <button type="button" id='del' class="btn btn-default">删除</button>
	              </div>
	              <a href="/messagearticle/del" class="btn btn-link">回收站</a>
		              <div class="table-responsive">
		                <table class="table table-bordered table-hover table-striped tablesorter">
		                  <thead>
		                    <tr>
		                      <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
		                      <th>标题</th>
		                      <th>所属分类</th>
		                      <th>来源</th>
		                      <th>来源网址</th>
		                      <th>更改时间</th>
		                      <th>操作</th>
		                    </tr>
		                  </thead>
		                  {volist name='list' id='vo'}
		                  <tbody>
		                    <tr>
		                      <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}"></span></div></td>
		                      <td>{$vo.title}</td>
		                      <td>{$vo.messagecategorys.name}</td>
		                      <td>{$vo.source}</td>
		                      <td>{$vo.url}</td>
		                      <td>{$vo.updated_at}</td>
		                      <td><a href="/messagearticle/{$vo.id}/edit">编辑</a>
		                    </tr>
		                  </tbody>
		                  {/volist}
		                </table>
		              </div> 
	            </div>
            </form>
            
            <div class="col-sm-12">
              <ul class="pagination pagination-sm pull-right">
                <li class="disabled"><a href="#"><</a></li>
                <li class="active"><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">></a></li>
              </ul>
            </div>
          </div>
          <!-- 选项卡内容1资讯类文章end -->
          <!-- 选项卡内容2常见问题文章start -->
          <div id="two" class="tab-pane fade">
            <!-- 基本信息start -->
            <div class="col-lg-12">
              <div class="form-group input-group" style="width:50%;float:right;">
                <input class="form-control" type="text">
                <span class="input-group-btn">
                  <button class="btn btn-default"><i class="fa fa-search"></i></button>
                </span>
              </div>
              <div class="btn-group">
                <a href="article-edit.php"class="btn btn-primary">添加文章</a>
              </div>
              <div class="btn-group">
                <button type="button" class="btn btn-default">删除</button>
              </div>
              <a href="article-recycle.php" class="btn btn-link">回收站</a>
              <div class="table-responsive">
                <table class="table table-bordered table-hover table-striped tablesorter">
                  <thead>
                    <tr>
                      <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                      <th>标题</th>
                      <th>来源</th>
                      <th>来源网址</th>
                      <th>发表时间</th>
                      <th>状态</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr>
                      <td><div class="checker"><span><input type="checkbox" name=""></span></div></td>
                      <td>房车营地发展趋势</td>
                      <td>国内新闻</td>
                      <td>施耐庵</td>
                      <td>2016-07-16 10:26:11</td>
                      <td>
                        <!-- 开关切换按钮 -->
                        <div class="btn-group btn-toggle"> 
                          <button class="btn btn-xs btn-default">ON</button>
                          <button class="btn btn-xs btn-primary active">OFF</button>
                        </div>
                        <!-- 开关切换按钮 -->
                      </td>
                      <td><a href="article-edit.php">编辑</a>
                    </tr>
                  </tbody>
                </table>
              </div> 
            </div>
            <div class="col-sm-12">
              <ul class="pagination pagination-sm pull-right">
                <li class="disabled"><a href="#"><</a></li>
                <li class="active"><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">></a></li>
              </ul>
            </div>
          </div>
          <!-- 选项卡内容2常见问题文章end -->
        </div>
        <!-- 选项卡内容end -->
      </div>
      <!-- 选项卡end -->
    </div>


    
  </div><!-- /#page-wrapper -->

</div><!-- /#wrapper -->
<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#del").click(function(){
    	if(confirm('确定要删除吗')){
     		 $("#delete").submit();
    	}
    });
  });
</script>
  </body>
</html>
